<cfparam name="live" type="boolean" default="false" />

<cfquery name="getCSACOrderContactList" datasource="WMS">
	select *
	from getCSACOrderContactList_20131217
</cfquery>

<cfdump var="#getCSACOrderContactList#">

<cfif live eq true>

	<cfloop query="#getCSACOrderContactList#">
	
		<cfhttp url="https://www.calgrants.org/applications/workshops/index.cfm?view=csacOrder&CSAC_Order_ID=#CSAC_Order_ID#&printable=true&token=w4vg675675676v5ew66b86786789inb7u69876i7" method="get" />
	
		<cfmail to="#Recipient_Email#" 
			cc="#Ordered_By_Email#" 
			bcc="cash4collegeca@gmail.com;ken@syntric.com" 
			from="cashforcollege@csac.ca.gov" 
			subject="CONFIRM your Cash for College Materials Order HERE" 
			type="HTML">
		
			<p><img src="http://www.calgrants.org/common/images/Cash_for_College_logo.gif" alt="Cash for College" style="margin-bottom: 20px;"></p>
		
			Dear #Recipient_First_Name# #Recipient_Last_Name#,
	 
			<p>We launched our Cash for College materials order system last week. We want to make sure your workshop materials are fulfilled correctly and sent out as soon as possible.</p>
			 
			<p>Please review your order below, make any changes or additions, and submit your final order.</p>
			 
			<p>This week before offices shut down for the break, we will process materials requests for workshops registered for the week of January 6. Please tell us when your office/institution returns from holiday break.</p>
			 
			<p>Happy Holidays!<br>
			Despina Costopoulos</p>
			
			<p><a href="https://www.calgrants.org/organizers">Login to your account</a></p>
			<p>If the link above does not work, copy and paste the following URL into your web browser:</p>
			<p>https://www.calgrants.org/organizers</p>
			<p>If you have forgotten your password, click the &quot;Forgot your password?&quot; link on the login page.</p>
			<p>If you have questions about your order, send an email to <a href="mailto:cashforcollege@csac.ca.gov">cashforcollege@csac.ca.gov</a>.</p>
			
			<hr>

			#cfhttp.FileContent#
				
		</cfmail>
		
	</cfloop>

<cfelse>

	<cfhttp url="https://www.calgrants.org/applications/workshops/index.cfm?view=csacOrder&CSAC_Order_ID=33&printable=true&token=w4vg675675676v5ew66b86786789inb7u69876i7" method="get" />

	<cfmail to="dcostopo@csac.ca.gov" 
		cc="ken@syntric.com" 
		from="cashforcollege@csac.ca.gov" 
		subject="CONFIRM your Cash for College Materials Order HERE" 
		type="HTML">
	
		<p><img src="http://www.calgrants.org/common/images/Cash_for_College_logo.gif" alt="Cash for College" style="margin-bottom: 20px;"></p>
	
		Dear *First_Name* *Last_Name*,
 
		<p>We launched our Cash for College materials order system last week. We want to make sure your workshop materials are fulfilled correctly and sent out as soon as possible.</p>
		 
		<p>Please review your order below, make any changes or additions, and submit your final order.</p>
		 
		<p>This week before offices shut down for the break, we will process materials requests for workshops registered for the week of January 6. Please tell us when your office/institution returns from holiday break.</p>
		 
		<p>Happy Holidays!<br>
		Despina Costopoulos</p>
		
		<p><a href="https://www.calgrants.org/organizers">Login to your account</a></p>
		<p>If the link above does not work, copy and paste the following URL into your web browser:</p>
		<p>https://www.calgrants.org/organizers</p>
		<p>If you have forgotten your password, click the &quot;Forgot your password?&quot; link on the login page.</p>
		<p>If you have questions about your order, send an email to <a href="mailto:cashforcollege@csac.ca.gov">cashforcollege@csac.ca.gov</a>.</p>
		
		<hr>

		#cfhttp.FileContent#
			
	</cfmail>

</cfif>




